<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@page import="java.util.*"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>登出系统</title>
</head>
<body>
</body>
<script type="text/javascript">
	// 所有的登出链接（json格式）
	var links =<%=request.getAttribute("LOGOUT_LINKS")%>;

	var redirect = "#";
	// 为每一个登出链接创建一个iframe，以便访问这些链接（除了CAS_LOGOUT需要最后访问）
	for(var i=0; i<links.length; i++){
		var item = links[i];
		var url = item.PARA_VALUE;
		if (item.PARA_ID != "FINAL_LOGOUT") {
			var iframe = document.createElement("iframe");
			iframe.src = url;
			iframe.style.display = "none";
			/*
			if (iframe.attachEvent) {
				iframe.attachEvent("onload", nextLogout);
			} else {
				iframe.onload = nextLogout;
			}
			*/
			document.body.appendChild(iframe);
		}else{
			redirect = url;
		}
	}
	//在iframe打开3秒之后（以确保iframe已经请求了登出页面），重定向到CAS_LOGOUT
	setTimeout("document.location = redirect;", 3000);
</script>
<%-- 废止session--%>
<%
    session.invalidate();
%>
</html>